Skip to content

Fix xovi checksum validation and harden extension lifecycle#8

Merged
cuttlefisch merged 2 commits into
mainfrom
fix/xovi-checksum-robustness
Apr 5, 2026
Merged

Fix xovi checksum validation and harden extension lifecycle#8
cuttlefisch merged 2 commits into
mainfrom
fix/xovi-checksum-robustness

Conversation

@cuttlefisch
Copy link
Copy Markdown
Owner

Summary

  • Root cause fix: Add .gitattributes to enforce LF line endings on QMD files — Windows core.autocrlf=true was converting LF→CRLF, breaking all SHA-512 checksums during xovi validation
  • Defense-in-depth: Normalize line endings before hashing at all layers (manifest generation, validation script, runtime verification)
  • Lifecycle hardening: Runtime checksum verification before deploy, vellum reenable check on deploy (not just install), orphaned QMD cleanup before vellum removal, persistent rebuild warnings
  • User-facing improvements: Supported firmware version range in UI, structured error details with operation names, actionable vellum error hints (6 categories), copy-for-bug-report formatting

Test plan

  • 13 new integration tests — full xovi lifecycle via mock SSH server (status, deploy, remove, vellum install/remove, reenable blocking)
  • 12 unit tests — normalizeLF, sha512Normalized, verifyQmdChecksum (including tamper detection and full manifest sweep)
  • 9 unit tests — parseVellumErrorHint (checksum, reenable, network, missing package, disk space, integrity, generic)
  • All 1027 tests passing, 0 lint errors, clean TS build
  • Manual: Docker build + verify xovi deploy on device with CRLF-converted QMDs
  • Manual: Test unsupported firmware version UI display

🤖 Generated with Claude Code

cuttlefisch and others added 2 commits April 5, 2026 12:28
Root cause: QMD files lack .gitattributes protection, so Windows
core.autocrlf=true converts LF→CRLF, breaking all SHA-512 checksums.

Fixes:
- Add .gitattributes to enforce LF line endings for QMD and shell files
- Normalize line endings before hashing (defense-in-depth) in manifest
  generation, validation script, and runtime verification
- Add runtime checksum verification before deploying to device
- Check vellum reenable status before xovi deploy (was only on install)
- Clean orphaned QMD files before vellum removal
- Persist rebuild_hashtable warnings in done event (was ephemeral)
- Show supported firmware version range in UI when firmware unsupported
- Add structured error details and operation names to ErrorDetails
- Parse vellum errors into actionable user hints (6 categories)

Tests: 13 new integration tests (full xovi lifecycle via mock SSH),
12 unit tests (normalizeLF, sha512Normalized, verifyQmdChecksum),
9 tests for parseVellumErrorHint. All 1027 tests passing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…um troubleshooting

- Add "Updating to a new version" section in quickstart with clear
  git pull + docker compose up workflow
- Add one-liner upgrade note to README Quick Start
- Fix cd path typo (remarkable_templates → RemarkableCustomTemplates)
  in both README and quickstart
- Add checksum validation troubleshooting entry in xovi docs pointing
  to PR #8

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cuttlefisch cuttlefisch merged commit 073e3d8 into main Apr 5, 2026
2 checks passed
cuttlefisch pushed a commit that referenced this pull request Apr 5, 2026
Backmerge xovi checksum robustness (PR #8) and device error
observability (PR #9) into the notebook builder feature branch.

Resolved conflicts in 7 files, fixed duplicate seedXoviFs export
and unused writeFileSync import from merge.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant